//
//  Individual.h
//  symbrion
//
//  Created by Berend Weel on 4/16/13.
//  Copyright (c) 2013 Berend Weel. All rights reserved.
//

#ifndef symbrion_Individual_h
#define symbrion_Individual_h

#include <vector>
#include "fixed32.h"
#include "Mathlib.h"

class Individual {
public:
    Individual(){
        hasFitness = false;
        id = Mathlib::getInt(INT_MAX);
    }
    
    Individual(const Individual &other){
        this->id = other.id;
        this->sigma = other.sigma;
        this->fitness = other.fitness;
        this->hasFitness = other.hasFitness;
        this->genome = other.genome;
    }
    
    void copy(Individual &other){
        this->sigma = other.sigma;
        this->genome = other.genome;
    }

    std::vector<LIOReal> genome;
    
    int id;
    bool hasFitness;
    LIOReal fitness;
    LIOReal sigma;
};

bool individualComparep(Individual *one, Individual *other);
bool individualCompare(const Individual &one, const Individual &other);

#endif
